# coding=utf-8
from _codecs import decode
from docx import Document


def printDocxText(url):
    # 打开文档
    document = Document(url)
    l = [paragraph.text.encode('utf8') for paragraph in document.paragraphs];
    for i in l:
        print(decode(i))


if __name__ == "__main__":
    docxPath = u'/Users/cai/Documents/sxw/sxw/resource/sxw-resource/打印指令v7.5(150911) (修复的).docx'
    printDocxText(docxPath)
